package com.jinkaimen.goodcash.ui.activity;

import android.content.Intent;
import android.view.View;
import android.widget.TextView;

import com.ht.baselibs.ui.base.BaseActivity;
import com.ht.baselibs.utils.ActivityUtils;
import com.jinkaimen.goodcash.R;

public class ResultActivity extends BaseActivity {

    public static final String RESULT_TITLE = "result_title";
    public static final String RESULT_MSG = "result_msg";

    private TextView mResultTitleView;
    private String mResultTitle;
    private String mResultMsg;
    private TextView mResultMsgView;

    @Override
    protected boolean isStaticPage() {
        return true;
    }

    @Override
    protected void initIntentData(Intent callIntent) {
        mResultTitle = callIntent.getStringExtra(RESULT_TITLE);
        mResultMsg = callIntent.getStringExtra(RESULT_MSG);
    }

    @Override
    protected void initTitleBar() {
        mTitleBarView.setLeftBtnIcon(R.mipmap.back_black)//
                .setTitleText("提交成功提醒")//
                .setTitleTextColor(R.color.black)
                .setBackgroundColor(getResources().getColor(R.color.white));
    }

    @Override
    protected int initContentView() {
        return R.layout.activity_identification_shop_success;
    }

    @Override
    protected void initChildView() {
        mResultTitleView = (TextView) findViewById(R.id.tv_activity_identification_shop_success_title);
        mResultMsgView = (TextView) findViewById(R.id.tv_activity_identification_shop_success_msg);
    }

    @Override
    protected void initChildData() {
        mResultTitleView.setText(mResultTitle);
        mResultMsgView.setText(mResultMsg);
    }

    @Override
    protected void setChildViewListener() {
        findViewById(R.id.btn_activity_identification_shop).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        switch (v.getId()){
            case R.id.btn_activity_identification_shop:
                ActivityUtils.startActivityAndFinish(this, HomeActivity.class);
                break;
        }
    }
}
